﻿@{
    Layout = null;
}
<!DOCTYPE html>

<html>
<head>
    <link href="~/Content/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/style.css" />
    <meta name="viewport" content="width=device-width" />
    <style>
        #reault {
            cursor: not-allowed;
        }
    </style>
    <title>组卷策略添加</title>
</head>
<body>
    <div>
        @using (Html.BeginForm("AddTestPaperDo", "SysUserInfo", FormMethod.Post))
        {

            <div>
                <table class="table table-container radius" style="width:800px;">
                    <tr>
                        <td class="text-r">学院：</td>
                        <td>
                            <select id="College" name="CollegeID" onchange="changeTie() " class="select" style="width:100px"></select>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-r">系：</td>
                        <td>
                            <select id="Tie" name="TieID" onchange="changephasetable() " class="select" style="width:100px"></select>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-r">阶段：</td>
                        <td>
                            <select id="phasetable" name="PhaseID" onchange="changeclass() " class="select" style="width:100px"> </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-r">试卷名称：</td>
                        <td>
                            <input type="text" placeholder="试卷名称" class="input-text radius" name="TestPaper_Name" />
                        </td>
                    </tr>
                    <tr>
                        <td class="text-r">单元：</td>
                        <td>
                            <select id="Tie" name="Unit_Name" class="select" style="width:100px">
                                @{
            foreach (var i in @ViewBag.unit)
            {

                <option value="@i.ID"> @i.Unit_Name</option>

            }
                                }
                            </select>
                        </td>
                    </tr>
                   <!--<tr>
                            <td class="text-r">开始时间：</td>
                            <td><input type="text" placeholder="开始时间" class="input-text radius" name="BeginExam"  /></td>
                        </tr>
                        <tr>
                            <td class="text-r">时长：</td>
                            <td><input type="text" placeholder="时长" class="input-text radius" name="EndTime" /></td>
                        </tr>-->
                    <tr>
                        <td class="text-r">是否开放：</td>
                        <td><input id="Radio1" type="radio" value="true" checked name="TestPaper_State" />是  <input id="Radio1" value="false" type="radio" name="TestPaper_State" />否</td>
                    </tr>
                    <tr>
                        <td class="text-r">考试班级</td>
                        <td>
                            <div id="classtable">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="text-r">开始时间：</td>
                        <td>
                            <input type="text" placeholder="开始时间" class="input-text radius" name="BeginExam" />
                            <input type="hidden" value="@ViewBag.guid" name="StrategyID" />
                        </td>
                    </tr>
                    <tr>
                        <td class="text-r">时长：</td>
                        <td><input type="text" placeholder="时长" class="input-text radius" name="EndTime" /></td>
                    </tr>
                    <tr class="text-c">
                        <td colspan="2">
                            <input type="submit" value="发布" class="btn btn-primary radius" style="width:120px;" />
                        </td>
                    </tr>
                </table>
            </div>
        }
    </div>
    <!--_footer 作为公共模版分离出去-->
    <script type="text/javascript" src="~/Content/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/lib/layer/2.4/layer.js"></script>

    <script src="~/Content/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/Content/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="~/Content/lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
    <script src="~/JS/TestPaperJS.js"></script>
</body>
</html>
<script>

    //$(function(){

    //    var ParentID = 1;
    //    $.ajax({
    //        url: "/SysUserInfo/ClassTableList?ParentID=" + ParentID,
    //        type: "get",
    //        dataType: "json",
    //        success: function (obj) {
    //            for (var i = 0; i < obj.length; i++) {
    //                $("#classtable").append(" <input name=\"Class_Name\" id=\"Checkbox1\" value=\"" + obj[i].ID + "\" type=\"checkbox\" /><span>" + obj[i].Class_Name + " </span>")
    //            }
    //        }
    //    })
    //})


    ///班级
    function changeclass() {

        $("#classtable").html("");
        var ParentID = $("#phasetable").val();
        $.ajax({
            url: "/SysUserInfo/ClassTableList?ParentID=" + ParentID,
            type: "get",
            dataType: "json",
            success: function (obj) {
                for (var i = 0; i < obj.length; i++) {
                    $("#classtable").append(" <input id=\"Checkbox1\" name=\"Class_Name\" value=\"" + obj[i].ID + "\" type=\"checkbox\" /><span>" + obj[i].Class_Name + " </span>")
                }
            }
        })
    }

</script>
